# -*- Makefile -*- 
ENUMGEN = enumgen
ENUMGEN_FLAGS +=
my-enum-files := $(strip $(sort $(ENUM_FILES)))
my-depend-files := $(my-enum-files:%=.%.depend)
ifneq ($(my-enum-files),)
enumgen-output-header-dir := $(strip $(firstword $(ENUM_HEADER_DIR)))
enumgen-output-header-dir := $(if $(enumgen-output-header-dir),$(enumgen-output-header-dir)/,)

.%.depend: %.enum
	$(ENUMGEN) $(ENUMGEN_FLAGS) $<

$(SRC): $(my-depend-files)

-include $(my-depend-files)
endif

REALCLEAN_FILES += .*.depend
